﻿@model VendorListModel
@inject IPageHeadBuilder pagebuilder
@{
    Layout = "_TwoColumns";

    //title
    pagebuilder.AddTitleParts(Loc["Title.Vendors"]);
}

<div class="page vendor-list-page">
    <h1 class="generalTitle h2">@Loc["Vendors.List"]</h1>
    <div class="vendor-grid">
        <div class="form-row flex-grid">
            @foreach (var item in Model.VendorsModel)
            {
                <div class="col-md-4 col-6">
                    <a class="mb-2" href="@Url.RouteUrl("Vendor", new { item.SeName })" title="@item.PictureModel.Title">
                        <div class="card">
                            <article>
                                <img class="img-fluid" src="@item.PictureModel.ImageUrl" alt="@item.PictureModel.AlternateText">
                                <div class="card-body">
                                    <h5>@item.Name</h5>
                                </div>
                            </article>
                        </div>
                    </a>
                </div>
            }
        </div>
        @if (Model.VendorsModel.Any())
        {
            <page-navigation asp-query-param="pagenumber" asp-pagination="Model.PagingModel"/>
        }
    </div>
</div>